package com.wing.order.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wing.order.model.entity.Purchase;
import com.wing.order.model.request.PurchaseForm;
import com.wing.order.model.response.PurchaseBarCodeVo;
import com.wing.order.model.response.PurchaseVO;

import java.util.List;
import java.util.Map;

/**
 * 采购-Service
 *
 * @author
 */
public interface PurchaseService extends IService<Purchase> {

    /**
     * 添加
     *
     * @param purchaseForm
     * @return
     */
    int add(PurchaseForm purchaseForm);

    /**
     * 列表-app
     *
     * @param params
     *
     * @return
     */
    List<PurchaseVO> list4app(Map<String, Object> params);

    /**
     * 分页list-app
     *
     * @param page
     * @param params
     *
     * @return
     */
    Page<PurchaseVO> pageList4app(Page page, Map<String, Object> params);

    /**
     * 详情-app
     *
     * @param id
     *
     * @return
     */
    PurchaseVO get4appById(Long id);

    int addPurchase(PurchaseForm purchaseForm);

    PurchaseVO getPurchaseByCode(String code);

    void purchaseSign(PurchaseForm purchaseForm);


    IPage<PurchaseBarCodeVo> getLableBySignId(Integer page, Integer limit,Long id);

}
